#ifndef TSPLCMD_H
#define TSPLCMD_H

#include <QObject>
#include <QByteArray>
#include "printerclient.h"

class TsplCmd : public QObject {
    Q_OBJECT
public:
    explicit TsplCmd(QObject *parent = nullptr);

    TsplCmd* PageSize(int width, int height);
    TsplCmd* Gap(int height);
    TsplCmd* Speed(int speed);
    TsplCmd* Density(int density);
    TsplCmd* Direction(int vertical, int horizontal);
    TsplCmd* Reference(int x, int y);
    TsplCmd* Cls();
    TsplCmd* DrawBitmap(QByteArray &grays, int width, int height, int dpi);
    TsplCmd* End();

    void SendToDevice(PrinterClient* client);

private:
    QByteArray data;

signals:
    void printError(const QString& error);
};

#endif // TSPLCMD_H
